package com.lovo.roomProject.classManager.service.impl;

import com.lovo.roomProject.classManager.dao.ClassDAO;
import com.lovo.roomProject.classManager.dao.impl.ClassDAOImpl;
import com.lovo.roomProject.classManager.service.ClassService;
import com.lovo.roomProject.pojo.ClaszDO;
import com.lovo.roomProject.pojo.CutPageBean;

import java.util.List;

public class ClassServiceImpl implements ClassService {
    private ClassDAO Manager = new ClassDAOImpl();

    @Override
    public List listClass() {

        return Manager.listClassManager();
    }

    @Override
    public void insert(ClaszDO claszDO) {
        Manager.insert(claszDO);
    }

    @Override
    public void delete(int id) {
        Manager.delete(id);
    }

    @Override
    public CutPageBean listClassByPage(int current) {
        return Manager.listClassByPage(current);
    }

    @Override
    public ClaszDO getClassByName(String name) {
        return Manager.getClassByName(name);
    }

    @Override
    public int getClassCount(int id) {
        return Manager.getClassCount(id);
    }


//    public static void main(String[] args) {
//        ClassService service = new ClassServiceImpl();
//        ClaszDO claszDO = service.getClassByName("J189");
//
//
//        System.out.println(claszDO.getName().equals("J189"));
//    }


}
